<?php
// =====================================================
// AnthroHeart - Simple Unique Daily Visitor Counter
// - Increments once per IP per day
// - Starts at 1 on the first visit
// - Uses two files in the SAME folder as index.php:
//     visitors.txt
//     unique_visitors.txt
// =====================================================

$counter_file = __DIR__ . '/visitors.txt';
$unique_file  = __DIR__ . '/unique_visitors.txt';

// Initialize counter file
if (!file_exists($counter_file)) {
    file_put_contents($counter_file, "0", LOCK_EX);
}

// Initialize unique visitors file
if (!file_exists($unique_file)) {
    file_put_contents($unique_file, serialize([]), LOCK_EX);
}

// Read current count safely
$count_raw = @file_get_contents($counter_file);
$count = is_string($count_raw) ? (int)trim($count_raw) : 0;

// Build unique key (IP + date)
$ip = $_SERVER['REMOTE_ADDR'] ?? 'unknown';
$date = date('Y-m-d');
$visitor_key = hash('sha256', $ip . '|' . $date);

// Load unique keys
$unique_raw = @file_get_contents($unique_file);
$unique_visitors = @unserialize($unique_raw);
if (!is_array($unique_visitors)) {
    $unique_visitors = [];
}

// Increment if new for today
if (!in_array($visitor_key, $unique_visitors, true)) {
    $unique_visitors[] = $visitor_key;
    $count++;

    file_put_contents($counter_file, (string)$count, LOCK_EX);
    file_put_contents($unique_file, serialize($unique_visitors), LOCK_EX);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>The AnthroHeart Collection – Public Domain Release</title>

<!-- Open Graph / Facebook -->
<meta property="og:title" content="The AnthroHeart Collection – Public Domain Release">
<meta property="og:description" content="Free public domain release of the complete AnthroHeart studio ecosystem (AnthrOS + Studio-in-a-Box). Bitcoin-timestamped, verifiable, and open to all creators.">
<meta property="og:image" content="http://69.48.205.55/blueheart.png">
<meta property="og:image:width" content="1200"> <!-- Recommended: helps platforms choose the right size -->
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="AnthroHeart blue heart logo">
<meta property="og:url" content="http://69.48.205.55/">
<meta property="og:type" content="website">
<meta property="og:site_name" content="AnthroHeart Collection">

<!-- Twitter Cards (for better large image support) -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="The AnthroHeart Collection – Public Domain Release">
<meta name="twitter:description" content="Free public domain release of the complete AnthroHeart studio ecosystem (AnthrOS + Studio-in-a-Box). Bitcoin-timestamped, verifiable, and open to all creators.">
<meta name="twitter:image" content="http://69.48.205.55/blueheart.png">
<meta name="twitter:image:alt" content="AnthroHeart blue heart logo">

<!-- Standard SEO -->
<meta name="description" content="Free public domain release of the complete AnthroHeart studio ecosystem (AnthrOS + Studio-in-a-Box). Bitcoin-timestamped, verifiable, and open to all creators.">
<meta name="keywords" content="anthroheart, anthros, studio-in-a-box, public domain, cc0, bitcoin timestamp, open source, creative tools">

<style>
body {
  font-family: "Courier New", monospace;
  background: #1a1a1a url('blueheart.png') center center fixed;
  background-size: cover;
  color: #00ff00;
  padding: 40px;
  max-width: 800px;
  margin: auto;
  position: relative;
}

/* Soft subtle effect: dark overlay to keep text readable while letting the image shine through */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(20, 20, 20, 0.75);
  pointer-events: none;
  z-index: -1;
}

h1 { border-bottom: 2px solid #00ff00; padding-bottom: 10px; }
.box {
  border: 1px solid #444;
  background: rgba(34, 34, 34, 0.85);
  backdrop-filter: blur(4px);
  padding: 20px;
  margin-top: 20px;
  border-radius: 5px;
}
a { color: #00ff00; text-decoration: none; font-weight: bold; }
a:hover { text-decoration: underline; background: #003300; }
.download-btn {
  display: inline-block;
  background: #00ff00;
  color: #000;
  padding: 15px 30px;
  font-size: 1.2em;
  margin-top: 10px;
}
.download-btn:hover { background: #fff; }
</style>
</head>

<body>

<h1>THE ANTHROHEART COLLECTION</h1>

<p>
<strong>Status:</strong> Public Domain (CC0)<br>
<strong>Date:</strong> December 25, 2025<br>
<strong>Notarization:</strong> Bitcoin Blockchain Timestamped<br>
<strong>Author: Anthro Entertainment LLC</strong>
</p>

<div class="box">
<h2>📂 DOWNLOADS</h2>
<p>The complete AnthroHeart studio ecosystem.</p>
<a href="http://archive.anthroentertainment.com" class="download-btn">⬇️ ARCHIVE MIRROR</a>&nbsp;
<a href="http://torrent.anthroentertainment.com" class="download-btn">⬇️ TORRENT</a>
</div>

<div class="box">
<h2>🛡️ VERIFICATION PROOFS</h2>
<p>
This release includes cryptographic proof establishing public existence
and authorship at a specific point in time.
</p>
<ul>
<li><a href="release_proof_20251225.json">📄 Release Manifest (JSON)</a></li>
<li><a href="release_proof_20251225.json.ots">⛓️ Bitcoin Timestamp Proof (.ots)</a></li>
</ul>
<p>
<em>Verification is independent. Upload the .ots file to
<a href="https://opentimestamps.org" target="_blank">opentimestamps.org</a>.</em>
</p>
</div>

<div class="box">
<h2>🧰 REPRODUCIBLE NOTARIZATION</h2>
<p>
The cryptographic proofs included with this release were generated using
simple, reproducible tooling.
</p>
<p>
The Python scripts used to hash, sign, and anchor this release to the Bitcoin
blockchain are provided for transparency and educational purposes.
</p>
<p>
These scripts are optional. Verification does <strong>not</strong> require
running them. They exist so others may independently audit or replicate
the process if desired.
</p>
<p>
<em>No paid permanence services were used. Proof of existence and hosting are
intentionally separated.</em>
</p>
<ul>
<li><a href="notarize_anthroheart.py.txt">📜 Genesis Notarization Script</a></li>
<li><a href="ANCHOR-TO-BITCOIN.py.txt">📜 Origin Anchor Script</a></li>
</ul>
</div>

<div class="box">
<h2>ℹ️ ABOUT</h2>
<p>
The AnthroHeart Collection contains AnthrOS and Studio-in-a-Box.
Formerly commercial. Released freely for all creators.
</p>
<p>
Hosted independently using standard Linux infrastructure.
</p>
<p>
<a href="https://www.anthroentertainment.com">Anthro Entertainment LLC</a>
</p>
</div>

<div class="box" style="text-align: center; margin-top: 40px; background: rgba(0, 51, 0, 0.8);">
  <p style="font-size: 1.4em; margin: 15px 0 5px;">
    🌍 <strong>Creators who have discovered this release:</strong>
  </p>
  <p style="font-size: 3em; margin: 10px 0; color: #00ff00; text-shadow: 0 0 10px #00ff00;">
    <?= number_format($count) ?>
  </p>
  <p style="font-size: 0.9em; opacity: 0.8; margin: 5px 0 15px;">
    (Unique daily visitors since launch ✨)
  </p>
</div>

</body>
</html>